var h1 = document.querySelector('h1')
h1.onclick = function (){
    this.style.color = 'blue'
}